{extend name="extra@index/base" /}
{block name="title"}修改登录密码{/block}

{block name="css"}

{/block}

{block name='page'}
<style>/**页面css写在这里*/
.card-header {
    color: white;
    background: #0099FF;
}

.icon-xitongfanhui:before {
    padding-right: 0.75rem;
}

.iconfont {
    font-size: 0.85rem;
}
</style>
<!-- 页面开始 -->
<div id="vue">
    <div class="card-header">
        <span><span class="iconfont icon-xitongfanhui" onclick="$.router.load('/my/user/index/',true,'left')"></span>修改登录密码</span>
    </div>
    <div class="list-block">
        <ul>
            <li>
                <div class="item-content">
                    <div class="item-media"></div>
                    <div class="item-inner">
                        <div class="item-title label">原密码</div>
                        <div class="item-input">
                            <input type="password" placeholder="请输入原密码" v-model="oldpwd">
                        </div>
                    </div>
                </div>
            </li>
            <li>
                <div class="item-content">
                    <div class="item-media"></div>
                    <div class="item-inner">
                        <div class="item-title label">新密码</div>
                        <div class="item-input">
                            <input type="password" placeholder="请输入新密码" v-model="newpwd1">
                        </div>
                    </div>
                </div>
            </li>
            <li>
                <div class="item-content">
                    <div class="item-media"></div>
                    <div class="item-inner">
                        <div class="item-title label">确认密码</div>
                        <div class="item-input">
                            <input type="password" placeholder="请再次输入新密码" v-model="newpwd2">
                        </div>
                    </div>
                </div>
            </li>
        </ul>
    </div>
    <div class="content-block">
        <p><a @click="validate" class="button button-fill button-success  button-big">确认修改 </a></p>
    </div>
</div>


<script>
    var vm = new Vue({
        el: '#vue',
        data:function () {
            return {
                oldpwd:'',
                newpwd1:'',
                newpwd2:'',
            }
        },
        methods:{
            validate:function () {
                $.get('/api/my/verifypwd',vm.$data,function (ret) {
                    $.alert(ret.msg,function(){
                        if (ret.code > 0) {
                            $.router.load('/my/user/index', true, 'left');
                        }
                    })

                });

            }
        }
    })
</script>




<!-- 页面结束 -->
{/block}

{block name="js"}
{/block}